from django.contrib import admin
from .models import Category, Anime, Label, Status

# Register your models here.


@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
    list_display = ('id', "__str__", "title")
    list_display_links = ("title", "id")


@admin.register(Anime)
class AnimeAdmin(admin.ModelAdmin):
    list_display = ('__str__', 'pub_date', "category")
    list_filter = ('category', 'label', 'status')
    list_per_page = 1
    search_fields = ('title',)


@admin.register(Label)
class LabelAdmin(admin.ModelAdmin):
    list_display = ('id', "__str__", "title")
    list_display_links = ("title", "id")


@admin.register(Status)
class StatusAdmin(admin.ModelAdmin):
    list_display = ('id', "__str__", "title")
    list_display_links = ("title", "id")